jquery is not working over local network [migrated]

Posted by Kortyell Davis on Pro Webmasters See other posts from Pro Webmasters or by Kortyell Davis
Published on 2012-10-22T19:33:44Z Indexed on 2012/10/22 23:18 UTC
Read the original article Hit count: 141

Filed under:
|
|
|
|

i have a fedora server running apache web server. the server is connected to a home network. i have a laptop connected to the same network. i can enter the ip address of my server into the browser of my laptop and pull up the index.html file located in the document root directory of the fedora home server. the index.html file contains jquery code. the jquery code only works when i open it locally in my browser (e.g. right click open with firefox), but when i attempt to view the webpage from my laptop the jquery code is not executed.

the code is here below.

<script type="text/javascript" src="jquery-1.8.2.js"></script>

' $(document).ready(function() {
$('#form').hide();
$('input[type=text]').focus(function() {
$(this).val('');
});
$('input[type=password]').focus(function() {
$(this).val('');
});
$('.form').hide();
$('#log').click(function(){
$('#form').toggle();
});
$('#reg').click(function(){

$('.form').toggle();
});
});

© Pro Webmasters or respective owner

Related posts about html

Related posts about apache